//编写一个函数，返回函数中最大值的下标，使用double
#include <stdio.h>

void count(double* ar, int n);

int main(void)
{
	double mark[5] = { 1.0,2.0,9.0,4.0,5.0 };
	printf("this is a test program");
	count(mark, 5);
}

void count(double* ar, int n)//n是这个数组的项数。
{
	int circul;
	double max = 1.0;
	int xiabiao = 0;
	for (circul = 0; circul <= 4; circul++)
	{
		if (max < (*(ar + circul)))
		{
			max = (*(ar + circul));
			xiabiao = circul;
		}
	}
	printf("\n  %lf  %d", max,xiabiao);
}